<?php echo $this->render($this->includeDir . '/toolbar.php');?>
<?php echo $this->flashMessage();?>
<?php 
	$arrParam = $this->arrParam;
	$this->Item['name'] = Zendvn_Filter_Filter::filterContent($this->Item['name']);
	$name 			= $this->formText('name',$this->Item['name'],array('class'=>'width-300 bg-green2 floatLeft' ));
	
		

	$options 		= array('inactive'=>$this->translate('Inactive'),'active'=>$this->translate('Active'));	
	$status 		= $this->formSelect('status',$this->Item['status'],array('class'=>'width-150'),$options);
	
	$description 	= Zendvn_Filter_Filter::filterContent($this->Item['description']);
	$description	= $this->formTextarea('description',$description,array('style'=>"width: 50%; height: 150px;"));
	
	$arrTooltip = array(
						'name'=>"Size name|Ex: X, L, XL.",
						'status'=>'Status of page',
						'description'=>"Description of size",
						);
						
	if(count($arrTooltip)>0){
		foreach ($arrTooltip as $key => $val){
		   if($key=='d_content') $attribs = array('leftOffset'=>-305);
		   $formHelp  .= $this->cmsFormHelp('.form-table #' . $key, $this->translate($val), $attribs); 
		}
	}
	
	 if(count($this->errors)>0){	
	 	foreach ($this->errors as $key => $val){	 		
	 		$$key .= $this->cmsError($key,$val);	
	 		$selector = '.form-table #' . $key . '-error';
	 		$options = array('type'=>'error','name'=>'#' .$key);
	 		$formHelp  .= $this->cmsFormHelp($selector, $this->translate($val),null,$options);
	 		
	 	}
	 }
	 $arrRow = array(
					array('label'=>$this->translate('Tên'),'input'=>$name),	
					array('label'=>$this->translate('Mô tả'),'input'=>$description),						
					array('label'=>$this->translate('Chi tiết'),'input'=>$status),
					);
	$tdForm = $this->partialLoop('row.php',$arrRow);
	
?>
<script type="text/javascript">
	$(document).ready(function() {
		<?php echo $formHelp;?>
	});
</script>
<div id="element-box">
	<div class="m">
		<div class="form-table">
        	<fieldset class="admin-fieldset">
                <legend class="admin-legend"><?php echo $this->translate('Form detail')?></legend>
            	<table width="100%" border="0">
                	<?php echo $tdForm;?>
                </table>
                <div class="clr"></div>
        	</fieldset>  
        </div>
       
        <div class="clr"></div>
	</div>
</div>
